load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "replicationutils",
    srcs = ["utils.go"],
    importpath = "github.com/cockroachdb/cockroach/pkg/ccl/crosscluster/replicationutils",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/jobs",
        "//pkg/jobs/jobspb",
        "//pkg/kv/kvpb",
        "//pkg/kv/kvserver/protectedts",
        "//pkg/kv/kvserver/protectedts/ptpb",
        "//pkg/repstream/streampb",
        "//pkg/roachpb",
        "//pkg/sql",
        "//pkg/sql/catalog/descs",
        "//pkg/sql/isql",
        "//pkg/storage",
        "//pkg/testutils",
        "//pkg/testutils/fingerprintutils",
        "//pkg/testutils/jobutils",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/util/ctxgroup",
        "//pkg/util/hlc",
        "//pkg/util/timeutil",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_stretchr_testify//require",
    ],
)

go_test(
    name = "replicationutils_test",
    srcs = ["utils_test.go"],
    embed = [":replicationutils"],
    deps = [
        "//pkg/clusterversion",
        "//pkg/kv/kvpb",
        "//pkg/roachpb",
        "//pkg/settings/cluster",
        "//pkg/storage",
        "//pkg/testutils/storageutils",
        "//pkg/util/hlc",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/timeutil",
        "@com_github_stretchr_testify//require",
    ],
)
